/*
  pyivl.h  -  Interval object interface

  This file is part of the IVL Library (LIBIVL).
  
  LIBIVL - library for interval computations 
  
  Copyright (c) 2007 Mateusz Paprocki
  
  The IVL Library is free software; you can redistribute it and/or modify
  it under the terms of the GNU Lesser General Public License as published
  by the Free Software Foundation; either version 2.1 of the License, or
  (at your option) any later version.

  The IVL Library is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
  License for more details.

  You should have received a copy of the GNU Lesser General Public License
  along with the IVL Library; see the file LICENCE.  If not, write to
  the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
  Boston, MA 02110-1301, USA.
*/

#ifndef Py_INTERVALOBJECT_H
#define Py_INTERVALOBJECT_H

#ifdef __cplusplus
extern "C" {
#endif

typedef struct {
    PyObject_HEAD
    ivl_t ob_ivl;
} PyIntervalObject;

PyAPI_DATA(PyTypeObject) PyInterval_Type;

#define PyInterval_Check(op) PyObject_TypeCheck(op, &PyInterval_Type)
#define PyInterval_CheckExact(op) ((op)->ob_type == &PyInterval_Type)

#ifdef __cplusplus
}
#endif

#endif /* not Py_INTERVALOBJECT_H */


